package com.usf.jprovider.schema.type;

import com.usf.jprovider.constants.Constants;
import com.usf.jprovider.object.env.Environment;
import com.usf.jprovider.object.type.JDate;
import com.usf.jprovider.object.type.JType;

public final class DBDate extends AbstractDBType{
	
	public DBDate() {
		super();
		format = Constants.DEFAULT_DATE_FORMAT;
	}

	@Override
	public String formatSQL(Environment env, String value) throws Exception {
		return env.getConnector().DateFormater(value, format);
	}
	
	@Override
	public JType<?> toJType(String value) throws Exception {
		return new JDate(value, format);
	}
	
}
